<template>
  <div class="hello">
    <input v-model="inputMsg" placeholder="输入内容" class="input-box">
    <div class="display-area">
      {{ inputMsg }}
    </div>
    <button @click="clearInput" class="clear-button">清空</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      inputMsg: ''
    }
  },
  methods: {
    clearInput() {
      this.inputMsg = '';
    }
  }
}
</script>

<style scoped>
.hello {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
}

.input-box {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  font-size: 16px;
  margin-bottom: 10px;
}

.display-area {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  font-size: 16px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  text-align: center;
}

.clear-button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}
</style>
